﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// 

namespace Csharpintro_315
{
    class Program
    {
        static void Main(string[] args)
        {
            // using the var key word
            var greet = "bon jour"; // string
            var greet2 = 500;  // int
             
            // string variable
            string greeting = "Hello c# world";
            string greeting2 = "Hi world";

            // boolean // default to false
            bool isCompleted = true;

            //
 
            /// control flow...
            /// 'if' checks for a true/false condition
            if (isCompleted)
            {
                // true 
            }
            else
            {
                // false
            }

            // for loop
            //for (int i = 0; i < obj.length; i++)
            //{
            //    //
            //}

            // List...
            List<string> nameList = new List<string>();
            nameList.Add("Mike");
            nameList.Add("Sally");
            nameList.Add("Jane");

            List<int> numList = new List<int>();
            numList.Add(100);
            numList.Add(500);
            numList.Add(5000);

            // Array...
            string[] nameArr = new string[3];
            nameArr[0] = "Sue";
            nameArr[1] = "Tyson";
            nameArr[2] = "Larry";

            int[] numArr = new int[3];
            numArr[0] = 101;
            numArr[1] = 511;
            numArr[2] = 1111;

            // output...
            Console.WriteLine("oi mundo"); // output feedback
            //Console.ReadLine(); // accept feedback, and wait

            // for loop
            for (int i = 0; i < nameArr.Length; i++)
            {
                string currName = nameArr[i];
                int currIdex = i;
                Console.WriteLine("name #{0} = {1} ", currName, currIdex);
            }

            // foreach
            foreach (string name in nameArr)
            {
                Console.WriteLine("The name is : " + name);
            }

            Console.WriteLine("Whats your fav team?");
           /*
            string tName = Console.ReadLine(); // wait for user input
            switch (tName)
            {
                case "Rockets":
                    Console.WriteLine("Go Houston!");
                    break;
                case "Spurs":
                    Console.WriteLine("Tim Duncan needs to retire!");
                    break;

                default:
                    Console.WriteLine("That team is awefull");
                        break;
            }
           // Console.WriteLine("temp name = {0}", tName); // output the feedback
            */



            // task 4...
            //  name, age, birthday, favorite hobby 
            Object[] myObjArr = new Object[4];
            myObjArr[0] = "Duncan";
            myObjArr[1] = 39;
            myObjArr[2] = "fri. 13th";
            myObjArr[3] = "currling";

            foreach (var item in myObjArr)
            {
                Console.WriteLine("Player stats: {0}", item);
            }

            // task 3...
            int[] billsNumbers = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            billsNumbers[0] = 100000;
            billsNumbers[1] = 12;
            billsNumbers[2] = 134;
            
            // = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            for (int i = 0; i < billsNumbers.Length; i++)
            {
                Console.WriteLine("bills count: {0}", billsNumbers[i]);
            }

            // Task 2
            //Console.WriteLine("my fav currling team?");
           // string rocks = Console.ReadLine();
            //Console.WriteLine(rocks);




            ArrayList arList = new ArrayList();
            arList.Add("foo");
            arList.Add(1243);
            object foo = new object();
            arList.Add(foo);
            for (int i = 0; i < arList.Count; i++)
            {
                Console.WriteLine("ar list... {0}", arList[i]);
            }



            // need at end, to prevent the program from closing
            Console.ReadLine(); 

        }
    }
    //
}
 